a214c1b2e206bdf182ee429fe730cc927de765bd,src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java,MapillaryDownloader,automaticDownload,#,197

Before Change


    if (getMode() != DOWNLOAD_MODE.OSM_AREA) {
      throw new IllegalStateException("Must be in automatic mode.");
    }
    for (Bounds bounds : Main.getLayerManager().getEditLayer().data.getDataSourceBounds()) {
      if (!MapillaryLayer.getInstance().getData().getBounds().contains(bounds)) {
        MapillaryLayer.getInstance().getData().getBounds().add(bounds);
        MapillaryDownloader.getImages(bounds.getMin(), bounds.getMax());

After Change


    if (getMode() != DOWNLOAD_MODE.OSM_AREA) {
      throw new IllegalStateException("Must be in automatic mode.");
    }
    Main.getLayerManager().getEditLayer().data.getDataSourceBounds().stream().filter(bounds -> !MapillaryLayer.getInstance().getData().getBounds().contains(bounds)).forEach(bounds -> {
      MapillaryLayer.getInstance().getData().getBounds().add(bounds);
      MapillaryDownloader.getImages(bounds.getMin(), bounds.getMax());
    });